package checkers3d.presentation;

/**
 * An interface for objects that can manage caching and playing sounds. Given
 * the path to a sound file, it can either play them once or looping.
 *
 * @author      Ruben Acuna
 */
public interface ISoundEngine
{
    /**
    * Plays the contents of an audio file once. If a sound is looping, this
    * sound will be played concurrently and at higher volume.
    *
    * @param filename The relative path to a sound file.
    */
    void playOnce(String filename);

    /**
    * Plays the contains of a audio file continuously until shutdown is called.
    * If a sound is already looping, it will be replaced.
    *
    * @param filename The relative path to a sound file.
    */
    void playLoop(String filename);

    /**
    * Stops the audio device and releases sound resources.
    */
    void shutdown();

    /**
    * Sets up the audio device to play sound.
    */
    void start();
}